|
|
Peter Popov <pet### [at] usanet> wrote:
: Just use vector math, it's so much easier.
That's right.
The idea is this: Create a vector which points at the direction you want
to go (it can be, for example, the desired end destination (supposing that
the movement is linear) minus the current location). Then convert it to
a unit vector (vnormalize) and multiply it by the distance you want to
travel along that path. Now just add that vector to the current location.
--
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/
Post a reply to this message
|
|